    I have attached what I believe is correct code for the XBox hard drive 
password generation.  The code is for linux, written in c, and uses some 
standard crypto routines (rc4 and sha-1).  Please address any reports of 
incorrect password generation to this list and I'll try to figure out why it 
didn't work for you (please try to figure it out yourself first through!).

    As always, this code was created for the purpose of generating 
interoperable software (namely getting linux up and running on the xbox).

   Some notes about using this program:

1) you must provide two things for the HD key generation phase to function.  
First the eeprom key in a file called "eeprom_key.h" as a comma separated 
list of bytes.  Second, the contents of your eeprom (a minimum of the first 
48 bytes) also as a comma separated list in the file "eeprom_data.h"

2) if you would like to generate the HD password you must also provide 
either access to the hard drive, or the 512 response bytes of the 
DEVICE_IDENTIFY ata command.  There is a symbol (QUERY_XBOX_DRIVE) which, if 
defined will cause the program to issue an ide command to the drive to 
retrieve the data.  If not defined the data should be included in the file 
"drive_data.h" (again as a comma delimited list of bytes).

3) to indicate that you would like to have the program generate a password 
you must provide a command like parameter.  If you are issuing an ide 
command to retrieve the drive data the command line paramter should be the 
block device name to query (ie: /dev/hdc).  If you have hardcoded you drive 
data the parameter value doesn't matter, just it's presence.

    Good luck and Happy Hacking.

-SpeedBump
